﻿@model FashionWebsite.Models.Product
@using FashionWebsite
@using FashionWebsite.Models

@{
    Layout = null;
    var category = (List<Category>)ViewBag.listProductCatelogy;
    var color = (List<Color>)ViewBag.listColor;
    var size = (List<Size>)ViewBag.listSize;
    var producer = (List<Producer>)ViewBag.listProducer;
    var listproduct = (List<Product>)ViewBag.listproduct;
}

<!DOCTYPE html>

<html>
<head>
    <title>Edit</title>
</head>
<body>
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
        <fieldset>
            <legend>Product</legend>
    
            @Html.HiddenFor(model => model.ProductId)
            
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Code)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Code)
                @Html.ValidationMessageFor(model => model.Code)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductName)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ProductName)
                @Html.ValidationMessageFor(model => model.ProductName)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.CategoryId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.CategoryId)
                @Html.ValidationMessageFor(model => model.CategoryId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Price)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.State)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.State)
                @Html.ValidationMessageFor(model => model.State)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ColorId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ColorId)
                @Html.ValidationMessageFor(model => model.ColorId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.TypeId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TypeId)
                @Html.ValidationMessageFor(model => model.TypeId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Viewer)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Viewer)
                @Html.ValidationMessageFor(model => model.Viewer)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.SaleAmount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SaleAmount)
                @Html.ValidationMessageFor(model => model.SaleAmount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ProducerId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ProducerId)
                @Html.ValidationMessageFor(model => model.ProducerId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Amount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Amount)
                @Html.ValidationMessageFor(model => model.Amount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.SizeId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SizeId)
                @Html.ValidationMessageFor(model => model.SizeId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Status)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Status)
                @Html.ValidationMessageFor(model => model.Status)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Discount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Discount)
                @Html.ValidationMessageFor(model => model.Discount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.EntryLinks)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.EntryLinks)
                @Html.ValidationMessageFor(model => model.EntryLinks)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Keys)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Keys)
                @Html.ValidationMessageFor(model => model.Keys)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Rate)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Rate)
                @Html.ValidationMessageFor(model => model.Rate)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.UrlImage)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.UrlImage)
                @Html.ValidationMessageFor(model => model.UrlImage)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Priority)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Priority)
                @Html.ValidationMessageFor(model => model.Priority)
            </div>
    
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
    }
    
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
</body>
</html>
